package com.lenovo.hawk.service.impl;

import com.lenovo.hawk.constant.DataSourceType;
import com.lenovo.hawk.constant.TargetDataSource;
import com.lenovo.hawk.mapper.CompMapper;
import com.lenovo.hawk.service.CompService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class CompServiceImpl implements CompService {

    @Autowired
    CompMapper compMapper;

    @Override
    @TargetDataSource(DataSourceType.SLAVE)
    public Integer findAll() {
        return compMapper.findAll();
    }
}
